﻿using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;

namespace Three_Red_Dragon_Mvc.Controllers
{
    /// <summary>
    /// 采购/委外订单
    /// </summary>
    public class PurchaseOutsourceController : Controller
    {
        private readonly IpAddressesConfig _ipAddressesConfig;

        public PurchaseOutsourceController(IOptions<IpAddressesConfig> ipAddressesConfig)
        {
            _ipAddressesConfig = ipAddressesConfig.Value;
        }
        /// <summary>
        /// 采购/委外订单列表
        /// </summary>
        /// <returns></returns>
        public IActionResult PurchaseOutsourceInfo()
        {
            ViewBag.RBACWrite = _ipAddressesConfig.RBACWrite;
            ViewBag.RedDragonWrite = _ipAddressesConfig.RedDragonWrite;
            return View();
        }

        /// <summary>
        /// 添加采购/委外订单
        /// </summary>
        /// <returns></returns>
        public IActionResult CreatePurchaseOutsource()
        {
            ViewBag.RBACWrite = _ipAddressesConfig.RBACWrite;
            ViewBag.RedDragonWrite = _ipAddressesConfig.RedDragonWrite;
            return View();
        }

        /// <summary>
        /// 添加订单行
        /// </summary>
        /// <returns></returns>
        public IActionResult CreateOrderBank()
        {
            ViewBag.RBACWrite = _ipAddressesConfig.RBACWrite;
            ViewBag.RedDragonWrite = _ipAddressesConfig.RedDragonWrite;
            return View();
        }

        /// <summary>
        /// 添加付款计划行
        /// </summary>
        /// <returns></returns>
        public IActionResult CreatePayment()
        {
            ViewBag.RBACWrite = _ipAddressesConfig.RBACWrite;
            ViewBag.RedDragonWrite = _ipAddressesConfig.RedDragonWrite;
            return View();
        }

        /// <summary>
        /// 修改采购/委外订单
        /// </summary>
        /// <returns></returns>
        public IActionResult UpdatePurchaseOutsource()
        {
            ViewBag.RBACWrite = _ipAddressesConfig.RBACWrite;
            ViewBag.RedDragonWrite = _ipAddressesConfig.RedDragonWrite;
            return View();
        }
    }
}
